package business;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import service.myService.panduan.PanduanService;
import service.myService.panduan.PanduanServiceImpl;
import service.myService.panduan.PanduanServiceImpl_1;
import service.vo.MessageVO;
import struts.action.Action;
import struts.form.ActionForm;
import sun.security.krb5.internal.PAData;

public class PandAction implements Action {

	public String execute(HttpServletRequest request) {
		String url = "";
		PanduanService service = new PanduanServiceImpl_1();
		Map<String,MessageVO> map = service.getVo(request.getParameter("text"));
		Set<String> set = map.keySet();
		for(Iterator<String> it =set.iterator();it.hasNext();){
			url = it.next();
			request.setAttribute("mess", map.get(url));
		}
		return url;
	}

	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response, ActionForm form,
			Map<String, String> actionForward) {
		// TODO Auto-generated method stub
		return null;
	}

	
	
}
